#ifndef EFFECTEDITOR_H
#define EFFECTEDITOR_H

#include <QLabel>
#include <QPushButton>
#include <QWidget>
#include <material_editor/basematerialeditor.h>
#include <grouptreeitemview.h>
#include <ui_effecteditor.h>

class MaterialView;
class EffectStagesModel;
class EffectProgramsModel;
class EffectEditor : public BaseMaterialEditorWidget
{
  Q_OBJECT
private:
  Ui::EffectEditor  _gui;
  GroupTreeItemView *_groupView;
  MaterialView      *_materialView;
  Effect            *_effect;

	EffectStagesModel	*_stagesModel;
	EffectProgramsModel	*_programsModel;
  Program* GetProgram (Program* current);

  void UpdateGUI();
private slots:

	void on_treeViewPrograms_activated (const QModelIndex& index);
	void on_listViewStages_clicked (const QModelIndex& index);
	void on_pushButtonAddStage_clicked ();
	void on_pushButtonRemoveStage_clicked ();

public:
  EffectEditor(Effect* effect, MaterialView* view, QWidget *parent = 0);

  void SetEffect (Effect* effect);

  void Save ();
signals:

public slots:

};

#endif // EFFECTEDITOR_H
